package com.home.andromo;

import java.io.BufferedOutputStream;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.net.URL;
import java.net.URLConnection;

import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Bitmap.CompressFormat;
import android.util.Log;

public class Application {
	
	
	private ApplicationInfo app;
	
	public Application(ApplicationInfo app) {
		super();
		this.app = app;
	}

	public ApplicationInfo getApp() {
		return app;
	}

	
	public Bitmap cargarImagen(){
		 BitmapFactory.Options options = new BitmapFactory.Options();
		 Bitmap bm = BitmapFactory.decodeFile("/sdcard/Andromo/icons/"+app.packageName+".jpg", options);
		  if(bm!= null){
			 return bm; 
		  }else{
				return null;
		  }
	}
	
	
	
	
	
	


}
